<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.net.http.HttpPost</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.net.http.HttpPost";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.net.http.HttpPost.html" class="symbol">tango.net.http.HttpPost</a></h1>
  
<p class="sec_header">License:</p>BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a>
<p class="sec_header">Version:</p>Initial release: January 2006
<p class="sec_header">Author:</p>Kris
<dl>
<dt class="decl">class <a class="symbol _class" name="HttpPost" href="./htmlsrc/tango.net.http.HttpPost.html#L37" kind="class" beg="37" end="121">HttpPost</a> : HttpClient; <a title="Permalink to this symbol" href="#HttpPost" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpPost.html#L37">#</a></dt>
<dd class="ddef">
<div class="summary">Supports the basic needs of a client sending POST requests to a
        HTTP server. The following is a usage example:</div>
<pre class="d_code">
<span class="lc">// open a web-page for posting (see HttpGet for simple reading)</span>
<span class="k">auto</span> <span class="i">post</span> = <span class="k">new</span> <span class="i">HttpPost</span> (<span class="sl">"http://yourhost/yourpath"</span>);

<span class="lc">// send, retrieve and display response</span>
<span class="i">Cout</span> (<span class="k">cast</span>(<span class="k">char</span>[]) <span class="i">post</span>.<span class="i">write</span>(<span class="sl">"posted data"</span>, <span class="sl">"text/plain"</span>));
</pre>
<dl>
<dt class="decl"><a class="symbol _ctor" name="HttpPost.this" href="./htmlsrc/tango.net.http.HttpPost.html#L49" kind="ctor" beg="49" end="52">this</a><span class="params">(char[] <em>url</em>, uint <em>pageChunk</em> = 16 * 1024)</span>; <a title="Permalink to this symbol" href="#HttpPost.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpPost.html#L49">#</a></dt>
<dd class="ddef">
<div class="summary">Create a client for the given URL. The argument should be
                fully qualified with an "http:" or "https:" scheme, or an
                explicit port should be provided.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="HttpPost.this:2" href="./htmlsrc/tango.net.http.HttpPost.html#L62" kind="ctor" beg="62" end="66">this</a><span class="params">(Uri <em>uri</em>, uint <em>pageChunk</em> = 16 * 1024)</span>; <a title="Permalink to this symbol" href="#HttpPost.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpPost.html#L62">#</a></dt>
<dd class="ddef">
<div class="summary">Create a client with the provided Uri instance. The Uri should 
                be fully qualified with an "http:" or "https:" scheme, or an
                explicit port should be provided.</div></dd>
<dt class="decl">void[] <a class="symbol _function" name="HttpPost.write" href="./htmlsrc/tango.net.http.HttpPost.html#L74" kind="function" beg="74" end="77">write</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#HttpPost.write" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpPost.html#L74">#</a></dt>
<dd class="ddef">
<div class="summary">Send query params only</div></dd>
<dt class="decl">void[] <a class="symbol _function" name="HttpPost.write:2" href="./htmlsrc/tango.net.http.HttpPost.html#L87" kind="function" beg="87" end="95">write</a><span class="params">(void[] <em>content</em>, char[] <em>type</em>)</span>; <a title="Permalink to this symbol" href="#HttpPost.write:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpPost.html#L87">#</a></dt>
<dd class="ddef">
<div class="summary">Send content and no query params. The contentLength header
                will be set to match the provided content, and contentType
                set to the given type.</div></dd>
<dt class="decl">void[] <a class="symbol _function" name="HttpPost.write:3" href="./htmlsrc/tango.net.http.HttpPost.html#L105" kind="function" beg="105" end="120">write</a><span class="params">(Pump <em>pump</em>)</span>; <a title="Permalink to this symbol" href="#HttpPost.write:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpPost.html#L105">#</a></dt>
<dd class="ddef">
<div class="summary">Send raw data via the provided pump, and no query 
                params. You have full control over headers and so 
                on via this method.</div></dd></dl></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2004 Kris Bell. All rights reserved</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:03:56 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>